<%@ page language="java" import="com.alibaba.fastjson.JSONArray" pageEncoding="UTF-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%--获取流水号--%>
<%
    JSONObject jsonData = new JSONObject();
    RecordSet rs = new RecordSet();
    JSONArray dataList = new JSONArray();
    String ids = Util.null2String( request.getParameter( "ids" ) );
    if(!"".equals(ids)){
        String [] arr = ids.split(",");
        for (String zhid:arr) {
            JSONObject jsonObject = new JSONObject();
            String mainid = zhid.split("_")[0];
            String mxid = zhid.split("_")[1];
            rs.executeQuery("select * from formtable_main_97_dt1 where mainid='"+mainid+"' and id='"+mxid+"'");
            rs.next();
            String wpmchms = Util.null2String(rs.getString("wpmchms"));
            String gg = Util.null2String(rs.getString("gg"));
            String sl = Util.null2String(rs.getString("sl"));
            String xsddh = Util.null2String(rs.getString("xsddh"));
            String xsddhh = Util.null2String(rs.getString("xsddhh"));
            String xqrq = Util.null2String(rs.getString("xqrq"));
            String xbz = Util.null2String(rs.getString("xbz"));
            jsonObject.put("wpmchms",wpmchms);
            jsonObject.put("gg",gg);
            jsonObject.put("sl",sl);
            jsonObject.put("xsddh",xsddh);
            jsonObject.put("xsddhh",xsddhh);
            jsonObject.put("xqrq",xqrq);
            jsonObject.put("xbz",xbz);
            jsonObject.put("mxid",zhid);
            dataList.add(jsonObject);
        }
    }
    jsonData.put( "datas", dataList );
    out.print( jsonData.toJSONString() );
%>